﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace Jon.Adventureworks.Core.ExtensionMethods
{
    public static class SystemUIWebControlsExtensions
    {
        /// <summary>
        /// Clears the specified <see cref="System.Web.UI.WebControls.TextBox"/> control.
        /// </summary>
        /// <param name="c">The text box control.</param>
        /// <returns><see cref="System.Web.UI.WebControls.TextBox"/> with Text property equal to empty string.</returns>
        public static string ClearText(this TextBox tb)
        {
            return tb.Text = string.Empty;
        }
    }
}
